import request from '@/utils/request'

// 查询学生信息列表

export function listWorstScores(query) {
  return request({
    url: '/Teacher/students/list',  // 使用明确的API路径
    method: 'get',
    params: query,
    headers: {
      'Accept': 'application/json',  // 明确要求JSON响应
      'X-Requested-With': 'XMLHttpRequest' // 标识为AJAX请求
    }
  })
}


// 提交成绩复核
export function reviewScore(data) {
  return request({
    url: '/Teacher/students/review',
    method: 'post',
    data: data
  })
}

// 查询学生信息详细
export function getStudents(studentId) {
  return request({
    url: '/Teacher/students/' + studentId,
    method: 'get'
  })
}

// 新增学生信息
export function addStudents(data) {
  return request({
    url: '/Teacher/students',
    method: 'post',
    data: data
  })
}

// 修改学生信息
export function updateStudents(data) {
  return request({
    url: '/Teacher/students',
    method: 'put',
    data: data
  })
}

// 删除学生信息
export function delStudents(studentId) {
  return request({
    url: '/Teacher/students/' + studentId,
    method: 'delete'
  })
}
